package com.ruoyi.car.service.carmanage.impl;

import java.util.List;

import com.car.pojo.TbCarUpdateRecord;
import com.car.vo.VoCarUpdateRecord;
import com.ruoyi.car.mapper.carmanage.TbCarUpdateRecordMapper;
import com.ruoyi.car.service.carmanage.TbCarUpdateRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruoyi.common.core.text.Convert;

/**
 * 车辆修改记录Service业务层处理
 *
 * @author 敬乾超
 * @date 2020-06-24
 */
@Service
public class TbCarUpdateRecordServiceImpl implements TbCarUpdateRecordService {
    @Autowired
    private TbCarUpdateRecordMapper tbCarUpdateRecordMapper;

    /**
     * 查询车辆修改记录
     *
     * @param id 车辆修改记录ID
     * @return 车辆修改记录
     */
    @Override
    public TbCarUpdateRecord selectTbCarUpdateRecordById(Long id)
    {
        return tbCarUpdateRecordMapper.selectTbCarUpdateRecordById(id);
    }

    /**
     * 查询车辆修改记录列表
     *
     * @param tbCarUpdateRecord 车辆修改记录
     * @return 车辆修改记录
     */
    @Override
    public List<TbCarUpdateRecord> selectTbCarUpdateRecordList(TbCarUpdateRecord tbCarUpdateRecord)
    {
        return tbCarUpdateRecordMapper.selectTbCarUpdateRecordList(tbCarUpdateRecord);
    }

    /**
     * 新增车辆修改记录
     *
     * @param tbCarUpdateRecord 车辆修改记录
     * @return 结果
     */
    @Override
    public int insertTbCarUpdateRecord(TbCarUpdateRecord tbCarUpdateRecord)
    {
        return tbCarUpdateRecordMapper.insertTbCarUpdateRecord(tbCarUpdateRecord);
    }

    /**
     * 修改车辆修改记录
     *
     * @param tbCarUpdateRecord 车辆修改记录
     * @return 结果
     */
    @Override
    public int updateTbCarUpdateRecord(TbCarUpdateRecord tbCarUpdateRecord)
    {
        return tbCarUpdateRecordMapper.updateTbCarUpdateRecord(tbCarUpdateRecord);
    }

    /**
     * 删除车辆修改记录对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTbCarUpdateRecordByIds(String ids)
    {
        return tbCarUpdateRecordMapper.deleteTbCarUpdateRecordByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除车辆修改记录信息
     *
     * @param id 车辆修改记录ID
     * @return 结果
     */
    @Override
    public int deleteTbCarUpdateRecordById(Long id)
    {
        return tbCarUpdateRecordMapper.deleteTbCarUpdateRecordById(id);
    }

    @Override
    public List<VoCarUpdateRecord> getTestData(TbCarUpdateRecord record) {

        return tbCarUpdateRecordMapper.getTestData(record);
    }
}
